package com.wbl.tijianssm.controller;

import com.wbl.tijianssm.pojo.Setmeal;
import com.wbl.tijianssm.response.ApiRestResponse;
import com.wbl.tijianssm.service.SetmealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/setmeal")
public class SetmealController {

    @Autowired
    SetmealService setmealService;

    @ResponseBody
    @PostMapping ("/getAll")
    public ApiRestResponse getSetmealList(@RequestBody Setmeal setmeal){
        return setmealService.getSetmeallList(setmeal);
    }

    @ResponseBody
    @PostMapping("/getSetmealdetail")
    public ApiRestResponse getSetmealDetail(@RequestBody Setmeal setmeal){
        return setmealService.getSetmealDetail(setmeal);
    }
}
